package leetcode_700;

/**
 *@author 周杨
 *LongestContinuousIncreasingSubsequence_674 求一个数组的连续增长数组
 *describe:遍历即可 AC 100%
 *2018年10月6日 下午12:58:20
 */
public class LongestContinuousIncreasingSubsequence_674 {
	public int findLengthOfLCIS(int[] nums) {
        if(nums.length<=1)
        	return nums.length;
        int res=1;
        int dp=1;
        for(int i=1;i<nums.length;++i) {
        	if(nums[i]>nums[i-1]) {
        		dp++;
        		if(dp>res)
        			res=dp;
        	}
        	else
        		dp=1;
        }
        return res;
    }
}
